﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Common;
using System.Windows.Forms;
using System.Threading;
using MobileSales.Interface;

namespace MobileSales.Presenter
{
    class SplashFormPresenter
    {
        public SplashFormPresenter(ISplashWindowView splash)
        {
            splash.PaintProcess(10, "Настройки");
            try
            {
                Settings.GetInstance();
            }
            catch
            {
                MessageBox.Show("Помилка в завантаженні настройок", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                new SettingsForm().ShowDialog();
            }
            splash.PaintProcess(50, "Товари");
            //splash.Thread.Sleep(3000);
            splash.PaintProcess(75, "Головна форма");
            //splash.Thread.Sleep(3000);
        }
    }
}
